<!--
//****************************************************************/
//Creation History
// Company: GZ Office
// NAME:    Exiry Chang Pass Word
// TITLE:   Change pass word when login   
// BY:	    Oscar bai
// DATE:    2003/2/21
//******************************************************************/
-->

<%@ include file="header.jsp"	%>
<%@ page import="admin.*" %>

<script language=javascript>
 function formValidation() {
    var d1 = fm.new_passwd1;
    var d2 = fm.new_passwd2;

    if (isNull(d1,"New Passord")||isNull(d2,"Re-enter New Password"))  {
       return false;
    }
    
    if ( d1.value != d2.value ) {
	alert("New Password must be equal to Re-enter new password") ;
	d1.focus() ;
	return false;		
    }

    fm.passwd.value = d1.value ;
    return true;
 }

<%    
    formAction="Update";    
%>
</script>

<body>
<h2>Change Password</h2>
<form id=fm method=post action=<%=contextPath%>/servlet/admin.UserServlet  >
<input type=hidden name=formAction value=<%=formAction%> >
<input type=hidden name=expiryPasswd value=Y  >

<table cols=3 border=0 >
<tr>
  <td>New Password </td>
  <td><input type=password name=new_passwd1 maxlength=10 ></td>
</tr>
<tr>
  <td>Re-enter New Password </td>
  <td><input type=password name=new_passwd2 maxlength=10 ></td>
</tr>

<td><input type=hidden name=passwd value="<%=user.getPasswd()%>"></td>
<td><input type=hidden name=oldpasswd value="<%=user.getPasswd()%>"></td>
<td><input type=hidden name=user_id value="<%=user.getUser_id()%>" ></td>
<td><input type=hidden name=user_name value="<%=user.getUser_name()%>"></td>
<td><input type=hidden name=user_des value="<%=user.getUser_des()%>"></td>
<td><input type=hidden name=pass_exp_dat value="<%=user.getPass_exp_date()%>"></td>
<td><input type=hidden name=role_id value="<%=user.getRole_id()%>"></td>
<td><input type=hidden name=cost_center_id value="<%=user.getCost_center_id()%>"></td>
<td><input type=hidden name=email value="<%=user.getEmail()%>"></td>
<td><input type=hidden name=mobile value="<%=user.getMobile()%>"></td>
<td><input type=hidden name=staff_id value="<%=user.getStaff_id()%>"></td>
<td><input type=hidden name=active value="<%=user.getActive()%>"></td>
<!-- crlog 1055 -->
<td><input type=hidden name=request_group value="<%=user.getRequest_group()%>"></td>
</table>
<hr>
<p>
  <INPUT type=button value=Save onclick="save()" >  
  <INPUT type=button value=Back onclick=javascript:history.back()>
</p>

</form>

<%@ include file="footer.jsp" %>
</body>
</body>
</html>

